﻿using HiSport.Core;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HiSport.Core.Entity.Pay
{

    /// <summary>
    ///退款记录
    /// </summary>
    [SugarTable(null, "退款记录")]
    public class RefundRecord : EntityBaseData
    {
        
        /// <summary>
        /// 订单Id
        /// </summary>
        [SugarColumn(ColumnDescription = "订单ID", DefaultValue = "0", IsNullable = false, Length = 64)]
        public long  OrderId { get; set; }

        /// <summary>
        /// 订单编号
        /// </summary>
        [SugarColumn(ColumnDescription = "订单编号", DefaultValue = "", IsNullable = false, Length = 64)]
        public string OrderNo { get; set; }


        [SugarColumn(ColumnDescription = "支付单记录ID", DefaultValue = "0", IsNullable = false, Length = 64)]
        public long PayRecordId { get; set; }

        [SugarColumn(ColumnDescription = "支付单号", DefaultValue = "", IsNullable = false, Length = 64)]
        public string PayRecordNo { get; set; }

        /// <summary>
        /// 交易ID
        /// </summary>
        [SugarColumn(ColumnDescription = "交易ID", DefaultValue = "", IsNullable = false, Length = 64)]
        public string TransactionId { get; set; }


        /// <summary>
        /// 退款单号
        /// </summary>
        [SugarColumn(ColumnDescription = "退款单号", DefaultValue = "", IsNullable = false, Length = 64)]
        public string OutRefundNo { get; set; }

        /// <summary>
        /// 退款金额
        /// </summary>
        [SugarColumn(ColumnDescription = "退款金额", DefaultValue = "0", ColumnDataType = "decimal(18,2)", IsNullable = false)]
        public decimal RefundAmount { get; set; }

        [SugarColumn(ColumnDescription = "退款入账账户", DefaultValue = "", IsNullable = false, Length = 64)]
        public string UserReceivedAccount { get; set; }

        /// <summary>
        /// 支付记录状态
        /// </summary>
        [SugarColumn(ColumnDescription = "支付记录状态", DefaultValue = "0", IsNullable = false)]
        public RefundRecordStateEnum RefundState { get; set; }

    }
}
